package com.caochenlei.proxy.staticProxy;

public class UserDaoProxy implements UserDao {
    private UserDao userDao;

    public UserDaoProxy(UserDao userDao) {
        this.userDao = userDao;
    }

    @Override
    public void save() {
        userDao.save();
    }

    @Override
    public void delete() {
        System.out.println("UserDaoProxy 权限校验 ...");
        userDao.delete();
        System.out.println("UserDaoProxy 日志记录 ...");
    }

    @Override
    public void update() {
        userDao.update();
    }

    @Override
    public void find() {
        userDao.find();
    }
}
